package cn.cvs.dao;

import cn.cvs.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysUserMapper {

    int count();

    List<SysUser> getUserList();
//第二章
    List<SysUser> getUsersByRealName(String  realName);

    List<SysUser> getUserLIstByPojo(SysUser sysUser);

    List<SysUser> getUserLIstByMap(Map<String, Object> userMap);

    List<SysUser> getUSerListByParams(@Param("realName")String realName,@Param("roleId")int roleId);

    List<SysUser> getUSerListWithRoleName(SysUser sysUser);

    List<SysUser> getUSerListByRoleId(@Param("roleId")Integer roleId);

    List<SysUser> getUSerAnddAddressByUserId (@Param("userId")Integer roleId);

    int add(SysUser sysUser);

    int modify(SysUser sysUser);

    int updatePwd(@Param("id")Integer id,@Param("password") String pwd);

    int deleteUserById(@Param("id")Integer id);
    //第三章
    List<SysUser> selectList (@Param("realName")String realName,@Param("roleId") Integer roleId);

    List<SysUser> selectListByChoose(@Param("realName") String realName, @Param("roleId") Integer roleId, String account, Date createdTime);

    List<SysUser> getUserByRoleIdArray(Integer[] roleId);

    List<SysUser> getUserByRoleIdList(List<Integer> roleList);

    List<SysUser> getUserByRoleIdMap(Map<String,Object> roleMap);

    int update(SysUser sysUser);

}
